import 'package:get/get.dart';

import '../common/constant/sp_key.dart';
import '../utils/sp_utils.dart';

class AuthService extends GetxService {
  static AuthService get instance => Get.find<AuthService>();

  /// Mocks a login process
  // final isLoggedIn = SpUtil.getBool(SpKey.IS_LOGIN).obs;

  bool get isLogin => SpUtil.getBool(SpKey.isLogin);

  void login() {
    // isLoggedIn.value = true;
    SpUtil.putBool(SpKey.isLogin, true);
  }

  void logout() {
    SpUtil.putBool(SpKey.isLogin, false);
  }
}
